package com.example.springbootquartz.entity;


import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

/**
 * 定时任务调度表(SysJob)表实体类
 *
 * @author makejava
 * @since 2023-06-14 15:06:38
 */
@SuppressWarnings("serial")
@ApiModel("任务新增,修改入参")
public class SysJob extends Model<SysJob> {
    //任务ID
    @TableId
    private Long jobId;
    //任务名称
    @ApiModelProperty(value = "任务名称", example = "测试任务")
    private String jobName;
    //任务组名
    @ApiModelProperty(value = "任务组名", example = "DEFAULT",required = true)
    private String jobGroup;
    //调用目标字符串
    @ApiModelProperty(value = "调用目标字符串", example = "task.sout()",required = true)
    private String invokeTarget;
    //cron执行表达式
    @ApiModelProperty(value = "cron执行表达式", example = "0/2 * * * * ?",required = true)
    private String cronExpression;
    //计划执行错误策略（1立即执行 2执行一次 3放弃执行）
    @ApiModelProperty(value = "计划执行错误策略（1立即执行 2执行一次 3放弃执行） ", example = "3")
    private String misfirePolicy;
    //是否并发执行（0允许 1禁止）
    @ApiModelProperty(value = "是否并发执行 目前无用", example = "0")
    private String concurrent;
    //状态（0正常 1暂停）
    @ApiModelProperty(value = "状态（0正常 1暂停）", example = "0")
    private String status;
    //创建者
    private String createBy;
    //创建时间
    private Date createTime;
    //更新者
    private String updateBy;
    //更新时间
    private Date updateTime;
    //备注信息
    private String remark;


    public Long getJobId() {
        return jobId;
    }

    public void setJobId(Long jobId) {
        this.jobId = jobId;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getJobGroup() {
        return jobGroup;
    }

    public void setJobGroup(String jobGroup) {
        this.jobGroup = jobGroup;
    }

    public String getInvokeTarget() {
        return invokeTarget;
    }

    public void setInvokeTarget(String invokeTarget) {
        this.invokeTarget = invokeTarget;
    }

    public String getCronExpression() {
        return cronExpression;
    }

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }

    public String getMisfirePolicy() {
        return misfirePolicy;
    }

    public void setMisfirePolicy(String misfirePolicy) {
        this.misfirePolicy = misfirePolicy;
    }

    public String getConcurrent() {
        return concurrent;
    }

    public void setConcurrent(String concurrent) {
        this.concurrent = concurrent;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.jobId;
    }

    @Override
    public String toString() {
        return "SysJob{" +
                "jobId=" + jobId +
                ", jobName='" + jobName + '\'' +
                ", jobGroup='" + jobGroup + '\'' +
                ", invokeTarget='" + invokeTarget + '\'' +
                ", cronExpression='" + cronExpression + '\'' +
                ", misfirePolicy='" + misfirePolicy + '\'' +
                ", concurrent='" + concurrent + '\'' +
                ", status='" + status + '\'' +
                ", createBy='" + createBy + '\'' +
                ", createTime=" + createTime +
                ", updateBy='" + updateBy + '\'' +
                ", updateTime=" + updateTime +
                ", remark='" + remark + '\'' +
                '}';
    }
}

